<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!-- 引入标签库 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
	<head>
		<link rel="stylesheet" type="text/css"
			href="/sell_food/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css"
			href="/sell_food/css/theme.css">
		<link rel="stylesheet"
			href="/sell_food/font-awesome/css/font-awesome.css">
		<link rel="stylesheet" type="text/css"
			href="/sell_food/css/top.css">
		<script src="/sell_food/js/jquery-1.7.2.min.js"
			type="text/javascript"></script>
		<script src="/sell_food/bootstrap/js/bootstrap.js"></script>

		<script language="javascript">
		 function check()
		 {
		  var textvalue = document.getElementById("search_input").value;
		  if( textvalue == "" )
		  {
		   alert("请输入搜索内容!");
		    return false;
		  }
		 }

</script>
	</head>
	<body class="">
		<!--<![endif]-->

		<div class="navbar">
			<div class="navbar-inner" style="background:none repeat scroll 0 0 padding-box rgba(255, 78, 52, 1);">
				<s:if test="%{#session.loginUser != null}">
					<ul class="nav pull-right">

					<li>
						<a href="#" class="hidden-phone visible-tablet visible-desktop"
							role="button">设置</a>
					</li>
					<li id="fat-menu" class="dropdown">
						<a href="#" role="button" class="dropdown-toggle"
							data-toggle="dropdown"> <i class="icon-user"></i><s:property value="#session.loginUser.userName"/>
							<i class="icon-caret-down"></i></a>

						<ul class="dropdown-menu">
							<li>
								<a tabindex="-1" href="/sell_food/grzxshowAction">个人中心</a>
							</li>
							<li class="divider"></li>
							<li>
								<a tabindex="-1" href="/sell_food/allorder">我的订单</a>
							</li>
							<li class="divider"></li>
							<li>
								<a tabindex="-1" href="/sell_food/userExitAction">退出</a>
							</li>
						</ul>
					</li>

				</ul>
				</s:if>
				<s:else>
					<ul class="nav pull-right">

					<li>
						<a href="/sell_food/login.jsp" class="hidden-phone visible-tablet visible-desktop"
							role="button">登录</a>
					</li>
					<li>
						<a href="/sell_food/register.jsp" class="hidden-phone visible-tablet visible-desktop"
							role="button">注册</a>
					</li>
					</ul>
				</s:else>
							
				<a class="brand" href="/sell_food/userview/index.jsp"><span
					class="banner">美餐网/</span> <span class="second">普通用户界面</span>
				</a>
			</div>
		</div>
		<div class="sidebar-nav">
				<div class="logo">
			<img src="logo.jpg">
		</div>
		<div class="search-container" style="margin-left:1px;">
			<form action="showsearch" class="search form-inline" style="padding-left:5px;" onsubmit="return check()">
				<div id="search-tab" class="search-list" styele="">
					<select	name="searchType" class="select-option" style="width:30%;">
						<option id="item" value="item">
							餐饮
						</option>
						<option id="shop" value="shop">
							商铺
						</option>
					</select>
					<input type="text" id="search_input" class="searchText" name="key" placeholder="请输入搜索内容" 
					style="width:67%;height:30px;padding-top:3px;">
					<p style="color: red;">
											<s:property value="fieldErrors.key[0]" />
										</p>
				</div>
			</div>
			</form>

			<a href="#dashboard-menu" class="nav-header" data-toggle="collapse"><i
				class="icon-dashboard"></i>普通用户首页</a>
			<ul id="dashboard-menu" class="nav nav-list collapse in">
				<li>
					<a href="/sell_food/userview/index.jsp">首页</a>
				</li>
				<li>
					<a href="/sell_food/grzxshowAction">个人中心</a>
				</li>
			</ul>

			<a href="#table-menu" class="nav-header" data-toggle="collapse"><i
				class="icon-table"></i>按热门排行 </a>
			<ul id="table-menu" class="nav nav-list collapse in">
				<li>
					<a href="/sell_food/showhotItem">热门餐食</a>
				</li>
				<li>
					<a href="/sell_food/showhotStore">热门店铺</a>
				</li>
			</ul>

			<a href="#menu-menu" class="nav-header collapsed"
				data-toggle="collapse"><i class="icon-reorder"></i>分类 </a>
			<ul id="menu-menu" class="nav nav-list collapse in">
				<s:action name="alltypeAction" namespace="/*" executeResult="true">
    			</s:action>
			</ul>

			<a href="#cart-menu" class="nav-header" data-toggle="collapse"><i
				class="icon-th-large"></i>购物车功能</a>
			<ul id="cart-menu" class="nav nav-list collapse in">
				<li>
					<a href="cartInfo">购物车管理</a>
				</li>
			</ul>
			<a href="#order-menu" class="nav-header" data-toggle="collapse"><i
				class="icon-th-large"></i>订单功能</a>
			<ul id="order-menu" class="nav nav-list collapse in">
				<li>
					<a href="/sell_food/allorder">订单管理</a>
				</li>

			</ul>
		</div>
	</body>
</html>
